package nowcoder.day_48.day10;

import java.util.Scanner;

/**
 * HJ87 密码强度等级
 */
public class Num1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()){
            String str = in.nextLine();
            int sum = 0;
            int sum1 = getLen(str);
            int sum2 = getChar(str);
            int sum3 = getNum(str);
            int sum4 = getSym(str);
            if (sum2 == 20 && sum3 > 0 && sum4 > 0){
                sum = sum1+sum2+sum3+sum4+5;
            }else if (sum2 > 0 && sum3 > 0 && sum4 > 0){
                sum = sum1+sum2+sum3+sum4+3;
            }else if (sum2 > 0 && sum3 > 0 && sum4 == 0){
                sum = sum1+sum2+sum3+sum4+2;
            }else {
                sum = sum1+sum2+sum3+sum4;
            }
            if(sum>=90){
                System.out.println("VERY_SECURE");
            }else if(sum>=80){
                System.out.println("SECURE");
            }else if(sum>=70){
                System.out.println("VERY_STRONG");
            }else if(sum>=60){
                System.out.println("STRONG");
            }else if(sum>=50){
                System.out.println("AVERAGE");
            }else if(sum>=25){
                System.out.println("WEAK");
            }else if(sum>=0){
                System.out.println("VERY_WEAK");
            }
        }
    }
    public static int getLen(String str){
        int n = str.length();
        if (n <= 4){
            return 5;
        }else if (n >= 5 && n <= 7){
            return 10;
        }else if (n >= 8){
            return 25;
        }else {
            return 0;
        }
    }
    public static int getChar(String str){
        int small = 0;
        int big = 0;
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (ch >= 'a' && ch <= 'z'){
                small++;
            }else if (ch >= 'A' && ch <= 'Z'){
                big++;
            }
        }
        if (small > 0 && big > 0){
            return 20;
        }else if (small > 0 || big > 0){
            return 10;
        }else {
            return 0;
        }

    }
    public static int getNum(String str){
        int n = 0;
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (ch >= '0' && ch <= '9'){
                n++;
            }
        }
        if (n > 1){
            return 20;
        }else if (n == 1){
            return 10;
        }else {
            return 0;
        }

    }
    public static int getSym(String str){
        int n = 0;
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            if (!(ch >= 'a' && ch <= 'z') && !(ch >= 'A' && ch <= 'Z') && !(ch >= '0' && ch <= '9')){
                n++;
            }
        }

        if (n > 1){
            return 25;
        }else if (n == 1){
            return 10;
        }else {
            return 0;
        }

    }

}
